/*
    if练习
*/
#include <stdio.h>
int main() {
    int year = 0, month = 0, day = 0;
    printf("请输入年份，月");
    scanf("%d%d",&year, &month);
    if ((!(year % 4) && year % 100) || !(year % 400)) {
	if (month == 2) {
	    printf("%d天\n",29);
	}
	else if (month < 8 && month % 2) {
	    printf("%d天\n",31);
	}
	else if (month > 8 && month <= 12 && !(month % 2)) {
	    printf("%d天\n",31);
	}
	else {
	    printf("%d天\n",30);
	}
    }
    else if (month == 2) {
	printf("%d天\n",28);
    }
    else if (month < 8 && month % 2) {
        printf("%d天\n",31);
    }
    else if (month >= 8 && month <= 12 && !(month % 2)) {
        printf("%d天\n",31);
    }
    else {
         printf("%d天\n",30);
	}
    return 0;
}
